﻿using System;
using UnityEngine;
using UnityEngine.EventSystems;

namespace UniRx.Triggers
{
	// Token: 0x02000434 RID: 1076
	[DisallowMultipleComponent]
	public class ObservableInitializePotentialDragTrigger : ObservableTriggerBase, IEventSystemHandler, IInitializePotentialDragHandler
	{
		// Token: 0x06001695 RID: 5781 RVA: 0x00061F48 File Offset: 0x00060348
		void IInitializePotentialDragHandler.OnInitializePotentialDrag(PointerEventData eventData)
		{
			if (this.onInitializePotentialDrag != null)
			{
				this.onInitializePotentialDrag.OnNext(eventData);
			}
		}

		// Token: 0x06001696 RID: 5782 RVA: 0x00061F64 File Offset: 0x00060364
		public IObservable<PointerEventData> OnInitializePotentialDragAsObservable()
		{
			Subject<PointerEventData> result;
			if ((result = this.onInitializePotentialDrag) == null)
			{
				result = (this.onInitializePotentialDrag = new Subject<PointerEventData>());
			}
			return result;
		}

		// Token: 0x06001697 RID: 5783 RVA: 0x00061F8C File Offset: 0x0006038C
		protected override void RaiseOnCompletedOnDestroy()
		{
			if (this.onInitializePotentialDrag != null)
			{
				this.onInitializePotentialDrag.OnCompleted();
			}
		}

		// Token: 0x04000CAE RID: 3246
		private Subject<PointerEventData> onInitializePotentialDrag;
	}
}
